import { Pipe, PipeTransform } from '@angular/core';
import {isNullOrUndefined} from "util";
import {MainService} from '../service/main.service';

@Pipe({
  name: 'areaName'
})
export class AreaNamePipe implements PipeTransform {

  transform(value: any, args?: any): any {
    if(!isNullOrUndefined(value)){
      return MainService.getAreaByTwelveBitCode(value).fullName;
    }
  }

}
